<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登陆</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100vh;
        }

        .container {
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            padding: 20px;
            width: 300px;
            text-align: center;
        }

        input {
            width: 100%;
            padding: 10px;
            margin: 8px 0;
            box-sizing: border-box;
        }

        button {
            background-color: #4caf50;
            color: white;
            padding: 10px 15px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        button:hover {
            background-color: #45a049;
        }

        .switch-form {
            margin-top: 20px;
            font-size: 14px;
            color: #555;
        }

        .switch-form a {
            color: #4caf50;
            text-decoration: none;
        }
    </style>
</head>
<body>
<div class="container">
    <%-- 登录表单 --%>
    <form action="/exp6/user/login" method="post">
        <h2>登录</h2>
        <input type="text" id="username" name="username" placeholder="请输入用户名" required>
        <input type="password" id="password" name="password" placeholder="请输入密码" required>
        <button type="submit">登录</button>
    </form>

    <div class="switch-form">
        <span>还没有账号? <a href="#" onclick="toRegister()">注册</a></span>
    </div>
</div>

<script>
    function toRegister() {
        window.location.href="register.jsp"
    }
</script>
</body>
</html>
